package day08.thread02.stopThread;

/**
 * <>
 * <interrupt 与 return 结合停止线程>
 *
 * @Author WANG.SONG.
 * @Date 2019/3/3 0003 22:29
 * @see
 */
public class ReturnThread extends Thread{

    @Override
    public void run() {
        super.run();
        while (true){
            if (this.isInterrupted()){
                System.out.println("停止了");
                return;
            }
            System.out.println("timer: "+System.currentTimeMillis());
        }
    }
}
